package app.caretrack.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "MachineModels")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class MachineModel extends NamedBaseModel {

    private MachineManufacturer machineBrand;

    @ManyToOne(fetch = FetchType.EAGER, optional = false)
    public MachineManufacturer getMachineBrand() {
        return this.machineBrand;
    }

    public void setMachineBrand(MachineManufacturer machineBrand) {
        this.machineBrand = machineBrand;
    }

}
